<template>
	<view class="container">
		<view class="content">
			<!-- <text style="font-weight: 600;margin-bottom: 10px;display: block;">{{list.code}}</text> -->
			<uni-list :border="false">
				<uni-list-item title="名称:" :rightText="list.name"></uni-list-item>
				<uni-list-item title="承运单位:" :rightText="list.carrier"></uni-list-item>
				<uni-list-item title="收货单位:" :rightText="list.consignee"></uni-list-item>
				<uni-list-item title="收货方地址:" :rightText="list.consigneeAddress"></uni-list-item>
				<uni-list-item title="收货方联系人及电话:" :rightText="list.consigneePhone"></uni-list-item>
				<uni-list-item title="托运单位:" :rightText="list.shipper"></uni-list-item>
				<uni-list-item title="托运方联系电话:" :rightText="list.shipperPhone"></uni-list-item>
				<uni-list-item title="司机信息:"></uni-list-item>
				<uni-list-item title="司机信息:">
					<template v-slot:body>
						<view class="slot-box" style="width: 100%;">
							<uni-list v-for="(item,index) in list.projectDrivers" :key="index" :border="false">
								<uni-list-item title="姓名:" :rightText="item.driverName"></uni-list-item>
								<uni-list-item title="电话:" :rightText="item.driverPhone"></uni-list-item>
								<uni-list-item title="车牌号:" :rightText="item.licenseNumber"></uni-list-item>
							</uni-list>
						</view>
					</template>
				</uni-list-item>
				<!-- <uni-list-item title="现场评价:">
					<template v-slot:body>
					<button style="width: 100%;" v-if="isAuth ('field:evaluation')" @tap="redirectToClick()" type="primary">现场评价</button>
					</template>
				</uni-list-item> -->
			</uni-list>
			</view>
			

	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '登录适配',
				list: {},
			}
		},
		created() {
			this.getList()

		},
		methods: {
			getList() {
				console.log(this.$store.getters.productId)
				this.request({
					'url': '/wx/project/info/' + this.$store.getters.productId,
					'method': 'get',
				}).then(res => {
					console.log(res)
					if (res && res.code == 200) {
						this.list = res.info
					}
				}).catch(err => {

				})
			},
			redirectToClick(e) {
				console.log(e)
				// this.$modal.showToast('模块建设中~')
				wx.navigateTo({
					url: '/pages/fieldEvaluation/index'
				})
			
			},
			isAuth (key) {
			  return JSON.parse(uni.getStorageSync('permissions') || '[]').indexOf(key) !== -1 || false
			},

		}
	}
</script>

<style>
	.container {
		padding: 15px;
	}

	.content {
		background-color: #fff;
		border-radius: 10px;
		padding: 15px;
		box-shadow: 0px 0px 10px #e2dede;
	}
	.uni-list-item__content{
		min-width: 150px!important;
	}
	.uni-list-item__content,.slot-text {
		min-width: 80px;
	}

	.content .uni-list-item__content-title {
		color: #999;

	}

	.content .uni-list-item__extra-text {
		color: #3b4144;
		/* font-size: 14px; */
		text-align: right;
	}
	.uni-list-item__content-title{
		font-size: 16px!important;
	}
	.uni-list-item__extra-text{
		font-size: 14px!important;
	}
</style>